package test;

import java.util.*;

public class MeiTuan4 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNextInt()) {
            int len = scanner.nextInt();
            List<Integer> list = new ArrayList<>();
            int[] states = new int[len];
            int rootIndex = 0;
            for (int i = 0; i < len; i++) {
                list.add(scanner.nextInt());
            }
            if (list.contains(len)) {
                rootIndex = list.indexOf(len);
            } else {
                System.out.println("NO");
            }
            if (getRes1(list,states,rootIndex)) {
                System.out.println("YES");
            } else {
                System.out.println("NO");
            }
        }
    }

    private static boolean getRes1(List<Integer> nums, int[] states, int rootIndex) {
        states[rootIndex] = 1;
        if (nums.get(rootIndex) == 1){
            return true;
        }
        boolean res = false;
        List<int[]> nextIndexs = getNextIndexsList(nums,rootIndex,states);
        if (nextIndexs.size() == 0){
            states[rootIndex] = 0;
            return false;
        } else {
            for (int[] item : nextIndexs) {
                states[item[0]] = 1;
                states[item[1]] = 1;
                res = res || getRes(nums,states,item[0]) && getRes(nums,states,item[1]);
                states[item[0]] = 0;
                states[item[1]] = 0;
            }
        }
        states[rootIndex] = 0;
        return res;
    }

    private static boolean getRes(List<Integer> nums, int[] states, int rootIndex) {
        states[rootIndex] = 1;
        if (nums.get(rootIndex) == 1){
            return true;
        }
        int[] nextIndexs = getNextIndexs(nums,rootIndex,states);
        if (nextIndexs == null){
            return false;
        } else {
            return getRes(nums,states,nextIndexs[0]) && getRes(nums,states,nextIndexs[1]);
        }
    }

    private static List<int[]> getNextIndexsList(List<Integer> nums, int rootIndex, int[] states) {
        List<int[]> list = new ArrayList<>();
        for (int i = 0; i < nums.size() - 1; i++) {
            for (int j = i + 1; j < nums.size(); j++) {
                if (states[i] == 0 && states[j] == 0 && nums.get(i) + nums.get(j) + 1== nums.get(rootIndex)) {
                    int[] nextIndexs = new int[2];
                    nextIndexs[0] = i;
                    nextIndexs[1] = j;
                    list.add(nextIndexs);
                }
            }
        }
        return list;
    }

    private static int[] getNextIndexs(List<Integer> nums, int rootIndex, int[] states) {
        int[] nextIndexs = new int[2];
        for (int i = 0; i < nums.size() - 1; i++) {
            for (int j = i + 1; j < nums.size(); j++) {
                if (states[i] == 0 && states[j] == 0 && nums.get(i) + nums.get(j) + 1== nums.get(rootIndex)) {
                    nextIndexs[0] = i;
                    nextIndexs[1] = j;
                    return nextIndexs;
                }
            }
        }
        return null;
    }
}
